package com.ymatou.iapi.liveseller.service;

import java.util.List;

import com.google.gson.reflect.TypeToken;
import com.ymatou.iapi.liveseller.parameter.GetModelDetailResp;
import com.ymt.base.YmatouBaseCall;
import com.ymt.core.tool.FormatUtil;
import com.ymttest.utils.EnvSetup;
/**
*查询直播模特信息Call
*FreeMaker Template自动生成代码
*/
public class GetUserModelsCall extends YmatouBaseCall{
	private static String opurl ="api/liveModel/getUserModels";
	
	public GetUserModelsCall() {
		super(EnvSetup.getSystemUrl("liveseller_iapi"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	public List<GetModelDetailResp> getModelDetailsResp()
    {
		List<GetModelDetailResp> data = null;
        try {
        	String liveroominfo=getJsonObject().get("Data").toString();
        	data=(List<GetModelDetailResp>) FormatUtil.GSONToObject(liveroominfo, new TypeToken<List<GetModelDetailResp>>() {}.getType());
        } catch (Exception e) {
            e.printStackTrace();
        }
        return data;
    }
}